#!/usr/local/bin/python3
# -*- coding: UTF-8 -*-
"""
@author:apple
@file:demo01.py
@time:2022/02/11
"""


def flip(one):
    ...
    contain = list(one)
    res = []
    while contain:
        ...
        tmp = contain.pop(0)
        if isinstance(tmp, list):
            ...
            # contain.extend(tmp)
            # 往list头部插入数据
            contain[:0] = tmp
        else:
            res.append(tmp)
    return res


def opt(a: int, b: (1, 2), t: 'adsab') -> int:
    ...
    print(a, b, t)
    return 10


def test01():
    ...
    nums = [[1, 2, 3], 1, 10, [3, 4, 5, [7, 8, 9]]]
    print(flip(nums))


def test02():
    ...
    print(flip.__name__)
    print(flip.__code__)
    print(flip.__code__.co_varnames)
    print(flip.__code__.co_argcount)
    import sys
    print(sys.getrecursionlimit())


def test03():
    ...
    print(opt(10, 20, 30))
    # print(opt.__annotations__['a'])
    print(opt.__annotations__)


def test04():
    ...
    p = {x:x for x in range(10)}
    print(p)



def default_func(contain = []):
    ...
    contain.append(1)
    return contain


def test05():
    ...
    # print(default_func())
    # print(default_func())
    # print(default_func())
    #
    import dis

    # dis.dis(default_func)

    from  sys import *
    print(path)








if __name__ == '__main__':
    pass
    test05()
